<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.hotel.jabc.DB" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="icon" href="../images/icon.jpg" type="image/x-icon">
	<link rel="stylesheet" type="text/css" href="../css/generalstyle.css">
	
	<title>管理员管理</title>
	
  </head>
  
  <body>
  <%@ include file="admintop.jsp" %>
   <hr width="100%"></hr><br>
   <table align="left" border="0" width="80%">
   	<tr>
   		<td align="center"><a href=jsp/addAdmin.jsp>添加管理员</a></td>
   		<td><a href=jsp/adResetPwd.jsp>重置管理员密码</a></td>
   	</tr>
   </table><br><br>
   <%
   	Vector<String []> vadmin = DB.getAdminInfo();
   	int color = 0;//改变每行的颜色
    %>
    <table align="center" width="90%" cellspacing="1" bgcolor="black">
   		<tr bgcolor="white">
    		<th>管理员ID</th>		<th>管理员级别</th>
    		<th>删除</th>
    	</tr>
    	<%
    		for(String[] s:vadmin)
    		{
    	 %>
    	 <tr bgcolor=<%=color%2==0?"eeffee":"ffeeee" %>>
    	 	<td align="center"><%= s[0] %></td>
		        <% 
		        if(s[1].equals("1"))
		        {
		        %>
		    <td align="center">超级管理员</td>
		        <%
		        }
		        else
		        {
		         %>
		        <td align="center">普通管理员</td>
		        <% } %>        
		        <td align="center">
		         <a href=servlet/ListServlet?action=deleteAdmin&&adname=<%= s[0] %>>删除</a>
		        </td>
		       </tr>
		     <%
		         color++;
		       }
		      %>
    </table>
  </body>
</html>
